<template>
  <div>
    <div
      class="table-model"
      :class="{ active: curTableName == '' }"
      v-if="curTableName == 'milk_table'"
    >
      <div class="table-wrap">
        666
        <!-- <table-con-check
          :defaultTableData="tableData1"
          :tableConfig="tableConfig1"
          :curCheckArr="curCheckArr"
          :tableTitle="tableTitle"
          :hiddenBorder="hiddenBorder"
          @handleTableCheckArr="handleTableCheckArr"
          @handleCloseModel="handleCloseModel"
        /> -->
        <div class="close-btn" @click.stop="handleCloseTableModel">X</div>
      </div>
    </div>
  </div>
</template>

<script>
import table_con_check from "./table_con_check";

export default {
  props: {
    opt: {
      type: String,
    },
  },
  data() {
    return {
      tableData1: [],
      tableConfig: [],
      curCheckArr: [],
      tableTitle: "",
      hiddenBorder: "true",
      handleTableCheckArr: function () {},
      handleCloseModel: function () {},

      curTableName: "",
    };
  },
  created() {
    if (!this.opt) return;
    for (var itemKey in this.opt) {
      this[itemKey] = this.opt[itemKey];
    }
  },
  methods: {

     /* 关闭页面 */
    handleCloseTableModel() {
      this.curTableName = "";
    },

  }
};
</script>

<style lang="scss" scoped>

/* 列表样式 */
.table-model {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: 0.3s linear all;

  &.active {
    height: 100%;
    transition: 0.3s linear all;
  }

  .table-wrap {
    position: relative;
    width: 800px;
    height: 500px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
  }
  .close-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    color: #fff;
    text-align: center;
    line-height: 30px;
    border-radius: 50%;
    position: absolute;
    top: -20px;
    right: -40px;
  }
  .close-btn:hover {
    cursor: pointer;
  }
}

</style>